<template>
	<view class="container">
		<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item v-for="item,index in list">
				<view class="swiper-item">
					<image :src="'../../static'+item.icon" mode="" style="width: 100%; height: 240px;"></image>
					<text>{{item.typename}}</text>
				</view>
			</swiper-item>
		</swiper>
		<uni-section title="功能列表" sub-title="" >
			<uni-grid :column="5">
				<uni-grid-item v-for="(item,index) in typelist" :key="index" @click="toliuyan">
					<view style="display: flex;  flex-direction: column;align-items: center; padding: 10rpx; " >
						<image :src="'../../static/'+item.icon" style="width: 80rpx; height: 80rpx; " mode=""></image>
						<view>{{item.typename}}</view>
					</view>
				</uni-grid-item>

			</uni-grid>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				"list": [{

						"icon": "../../static/school1.jpg",
					},
					{

						"icon": "../../static/school2.jpg",
					},
					{
						"icon": "../../static/school3.jpg",
					},
					{
						"icon": "../../static/school4.jpg",
					}
				],
				"typelist": [{
						"id": 1,
						"typename": "新闻",
						"icon": "../../static/news.png"
					},
					{
						"id": 2,
						"typename": "公告",
						"icon": "../../static/announcement.png"
					},
					{
						"id": 3,
						"typename": "同学",
						"icon": "../../static/classmate.png"
					},
					{
						"id": 4,
						"typename": "电话",
						"icon": "../../static/telephone.png"
					},
					{
						"id": 5,
						"typename": "留言",
						"icon": "../../static/leaveword.png"
					}
				]

			}
		},
		methods: {
toliuyan(){
	uni.navigateTo({
		url:'/pages/liuyan/liuyan'
	})
}
		}
	}
</script>

<style>
	.container {
/* 		padding: 0;
		font-size: 14px;
		line-height: 24px; */
	}

	.swiper-item {}
</style>